
  /**
   *  data.parame1   ....
   *  data.parame2   ....
   */
export default function (canasId, data) {
  var ctx = wx.createCanvasContext(canasId)
    var bg_url = 'https://static.711688.net.cn/upload/card/source/ua_1901171733541225849.png'
    return new Promise((resolve, reject) => {
      wx.downloadFile({
        url: bg_url,
        success: res => {
          if (res.statusCode === 200) {
            ctx.beginPath()
            ctx.drawImage(res.tempFilePath, 0, 0, 500, 400) // 画 背景
            ctx.setTextAlign('center')
            // ,,,,,,,
            ctx.draw(true, () => {
              wx.canvasToTempFilePath({
                canvasId: canvasId,
                success: res => {
                  resolve(res.tempFilePath)

                },
                fail: err => {
                  reject(err)

                }
              })
            })
          }
        }
      })
    })
  }
